import request from '@/utils/request'

export function getTempOutputConfig(params) {
  return request({
    url: '/api/measure/measureOutputConfig',
    method: 'get',
    params: params
  });
};

export function postTempOutputConfig(data) {
  return request({
    url: '/api/measure/measureOutputConfig',
    method: 'post',
    data: data
  });
};


/**
 * 获取测温模式
 * @returns {Promise}
 */
export function getMeasureMode() {
  return request({
    url: '/api/measure/measureMode',
    method: 'get'
  });
};

/**
 * 设置测温模式
 * @param {object} data - 包含 mode 的对象, 例如 { mode: 0 }
 * @returns {Promise}
 */
export function postMeasureMode(data) {
  return request({
    url: '/api/measure/measureMode',
    method: 'post',
    data: data
  });
};

/**
 * 图像镜像接口 (GET)
 * @param {object} [query] - Optional query parameters.
 * --- Query Properties ---
 * @property {number} type - 图像方向类型(0-不需要，1-中心旋转，2-上下镜像，3-左右镜像) (Required).
 * @returns {Promise<object>} A promise resolving with the API response.
 * --- Response Properties (resolved object) ---
 * @property {number} code - 错误码.
 * @property {string} message - 错误信息.
 */
export function getRotate(query) {
  return request({
    url: '/api/image/rotate',
    method: 'get',
    params: query
  })
}

/**
 * 图像镜像接口 (POST)
 * @param {object} data - Request payload (Structure based on documentation).
 * --- Data Properties ---
 * @property {number} type - 图像方向类型(0-不需要，1-中心旋转，2-上下镜像，3-左右镜像) (Required).
 * @returns {Promise<object>} A promise resolving with the API response.
 * --- Response Properties (resolved object) ---
 * @property {number} code - 错误码.
 * @property {string} message - 错误信息.
 */
export function postRotate(data) {
  return request({
    url: '/api/image/rotate',
    method: 'post',
    data: data
  })
}

/**
 * 图像坏点矫正接口 (GET)
 * @param {object} [query] - Optional query parameters.
 * --- Query Properties ---
 * @property {number} mode - 1-添加矫正点，2-删除矫正点，3-保存矫正点 (Required).
 * @property {number} pointx - 坐标X (Required).
 * @property {number} pointy - 坐标Y (Required).
 * @returns {Promise<object>} A promise resolving with the API response.
 * --- Response Properties (resolved object) ---
 * @property {number} ruleVal - 色标值.
 */
export function getCorrectBadpixel(query) {
  return request({
    url: '/api/image/correctBadpixel',
    method: 'get',
    params: query
  })
}

/**
 * 图像坏点矫正接口 (POST)
 * @param {object} data - Request payload (Structure based on documentation).
 * --- Data Properties ---
 * @property {number} mode - 1-添加矫正点，2-删除矫正点，3-保存矫正点 (Required).
 * @property {number} pointx - 坐标X (Required).
 * @property {number} pointy - 坐标Y (Required).
 * @returns {Promise<object>} A promise resolving with the API response.
 * --- Response Properties (resolved object) ---
 * @property {number} ruleVal - 色标值.
 */
export function postCorrectBadpixel(data) {
  return request({
    url: '/api/image/correctBadpixel',
    method: 'post',
    data: data
  })
}

/**
 * 用户注册接口 (GET)
 * @param {object} [query] - Optional query parameters.
 * --- Query Properties ---
 * @property {number} type - 0-正向，1-反向 (Required).
 * @returns {Promise<any>} A promise resolving with the API response.
 */
export function getDirection(query) {
  return request({
    url: '/api/image/direction',
    method: 'get',
    params: query
  })
}

/**
 * 用户注册接口 (POST)
 * @param {object} data - Request payload (Structure based on documentation).
 * --- Data Properties ---
 * @property {number} type - 0-正向，1-反向 (Required).
 * @returns {Promise<any>} A promise resolving with the API response.
 */
export function postDirection(data) {
  return request({
    url: '/api/image/direction',
    method: 'post',
    data: data
  })
}

/**
 * 图像算法参数接口 (GET)
 * @param {object} [query] - Optional query parameters.
 * --- Query Properties ---
 * @property {number} ddr - 引导滤波参数（推荐10-80,0表示关闭） (Required).
 * @property {number} dde - 细节增强倍数（推荐2-10,0表示关闭） (Required).
 * @returns {Promise<any>} A promise resolving with the API response.
 */
export function getEnhancementParam(query) {
  return request({
    url: '/api/image/enhancementParam',
    method: 'get',
    params: query
  })
}

/**
 * 图像算法参数接口 (POST)
 * @param {object} data - Request payload (Structure based on documentation).
 * --- Data Properties ---
 * @property {number} ddr - 引导滤波参数（推荐10-80,0表示关闭） (Required).
 * @property {number} dde - 细节增强倍数（推荐2-10,0表示关闭） (Required).
 * @returns {Promise<any>} A promise resolving with the API response.
 */
export function postEnhancementParam(data) {
  return request({
    url: '/api/image/enhancementParam',
    method: 'post',
    data: data
  })
}

/**
 * 测温档位接口 (GET)
 * @param {object|undefined} [query] - Optional query parameters.
 * @returns {Promise<any>} A promise resolving with the API response.
 */
export function getTempRange(query) {
  return request({
    url: '/api/image/tempRange',
    method: 'get',
    params: query
  })
}

/**
 * 测温档位接口 (POST)
 * @param {object} data - Request payload (Payload structure not specified in docs).
 * @returns {Promise<any>} A promise resolving with the API response.
 */
export function postTempRange(data) {
  return request({
    url: '/api/image/tempRange',
    method: 'post',
    data: data
  })
}

/**
 * 图像降噪接口 (GET)
 * @param {object} [query] - Optional query parameters.
 * --- Query Properties ---
 * @property {number} frameNoiseReduceLevel - 空域降噪级别（0-20） (Required).
 * @property {number} interFrameNoiseReduceLevel - 时域降噪级别（0-20） (Required).
 * @returns {Promise<any>} A promise resolving with the API response.
 */
export function getNoiseReduce(query) {
  return request({
    url: '/api/image/noiseReduce',
    method: 'get',
    params: query
  })
}

/**
 * 图像降噪接口 (POST)
 * @param {object} data - Request payload (Structure based on documentation).
 * --- Data Properties ---
 * @property {number} frameNoiseReduceLevel - 空域降噪级别（0-20） (Required).
 * @property {number} interFrameNoiseReduceLevel - 时域降噪级别（0-20） (Required).
 * @returns {Promise<any>} A promise resolving with the API response.
 */
export function postNoiseReduce(data) {
  return request({
    url: '/api/image/noiseReduce',
    method: 'post',
    data: data
  })
}

/**
 * 调色板接口 (GET)
 * @param {object} [query] - Optional query parameters.
 * --- Query Properties ---
 * @property {string} rulerVal - Ironbow(&quot;铁红&quot;),Steel(&quot;钢铁&quot;),Amber(&quot;琥珀&quot;),Rainbow(&quot;彩虹&quot;),CopperBrown(&quot;铜棕色&quot;),HighContrast(&quot;高对比&quot;),HighRainbow(&quot;高彩虹&quot;),YellowGreen(&quot;黄绿色&quot;), WhiteHeat(&quot;白热&quot;),BlackHeat(&quot;黑热&quot;),Medical(&quot;医疗&quot;),Arctic(&quot;北极&quot;),Color1(&quot;颜色1&quot;),Color2(&quot;颜色2&quot;),Color3(&quot;颜色3&quot;),Ironbow1(&quot;铁红1&quot;),Colorful(&quot;多彩&quot;), (Required).
 * @returns {Promise<any>} A promise resolving with the API response.
 */
export function getPalettes(query) {
  return request({
    url: '/api/image/palettes',
    method: 'get',
    params: query
  })
}

/**
 * 调色板接口 (POST)
 * @param {object} data - Request payload (Structure based on documentation).
 * --- Data Properties ---
 * @property {string} rulerVal - Ironbow(&quot;铁红&quot;),Steel(&quot;钢铁&quot;),Amber(&quot;琥珀&quot;),Rainbow(&quot;彩虹&quot;),CopperBrown(&quot;铜棕色&quot;),HighContrast(&quot;高对比&quot;),HighRainbow(&quot;高彩虹&quot;),YellowGreen(&quot;黄绿色&quot;), WhiteHeat(&quot;白热&quot;),BlackHeat(&quot;黑热&quot;),Medical(&quot;医疗&quot;),Arctic(&quot;北极&quot;),Color1(&quot;颜色1&quot;),Color2(&quot;颜色2&quot;),Color3(&quot;颜色3&quot;),Ironbow1(&quot;铁红1&quot;),Colorful(&quot;多彩&quot;), (Required).
 * @returns {Promise<any>} A promise resolving with the API response.
 */
export function postPalettes(data) {
  return request({
    url: '/api/image/palettes',
    method: 'post',
    data: data
  })
}

/**
 * 显示参数调节接口 (GET)
 * @param {object} [query] - Optional query parameters.
 * --- Query Properties ---
 * @property {number} brightness - 亮度（0-100） (Required).
 * @property {number} contrast - 对比度（0-100） (Required).
 * @returns {Promise<any>} A promise resolving with the API response.
 */
export function getDisplayParam(query) {
  return request({
    url: '/api/image/displayParam',
    method: 'get',
    params: query
  })
}

/**
 * 显示参数调节接口 (POST)
 * @param {object} data - Request payload (Structure based on documentation).
 * --- Data Properties ---
 * @property {number} brightness - 亮度（0-100） (Required).
 * @property {number} contrast - 对比度（0-100） (Required).
 * @returns {Promise<any>} A promise resolving with the API response.
 */
export function postDisplayParam(data) {
  return request({
    url: '/api/system/displayParam',
    method: 'post',
    data: data
  })
}

/**
 * OSD叠加接口 (GET)
 * @param {object} [query] - Optional query parameters.
 * --- Query Properties ---
 * @property {number} showChannelName - 显示名称（0-不显示，1-显示） (Required).
 * @property {number} showDatetime - 显示日期（0-不显示，1-显示） (Required).
 * @property {number} showWeekday - 显示星期（0-不显示，1-显示） (Required).
 * @returns {Promise<any>} A promise resolving with the API response.
 */
export function getOsdSettings(query) {
  return request({
    url: '/api/image/basicOsdSetting',
    method: 'get',
    params: query
  })
}

/**
 * OSD叠加接口 (POST)
 * @param {object} data - Request payload (Structure based on documentation).
 * --- Data Properties ---
 * @property {number} showChannelName - 显示名称（0-不显示，1-显示） (Required).
 * @property {number} showDatetime - 显示日期（0-不显示，1-显示） (Required).
 * @property {number} showWeekday - 显示星期（0-不显示，1-显示） (Required).
 * @returns {Promise<any>} A promise resolving with the API response.
 */
export function postOsdSettings(data) {
  return request({
    url: '/api/image/osdSettings',
    method: 'post',
    data: data
  })
}

/**
 * 云台控制接口（透传） (GET)
 * @param {object} [query] - Optional query parameters.
 * --- Query Properties ---
 * @property {string} cmd - ptz命令 (Required).
 * @returns {Promise<any>} A promise resolving with the API response.
 */
export function getTransparentCmd(query) {
  return request({
    url: '/api/control/transparentCmd',
    method: 'get',
    params: query
  })
}

/**
 * 云台控制接口（透传） (POST)
 * @param {object} data - Request payload (Structure based on documentation).
 * --- Data Properties ---
 * @property {string} cmd - ptz命令 (Required).
 * @returns {Promise<any>} A promise resolving with the API response.
 */
export function postTransparentCmd(data) {
  return request({
    url: '/api/control/transparentCmd',
    method: 'post',
    data: data
  })
}

/**
 * 云台控制-预置点配置接口 (GET)
 * @param {object} [query] - Optional query parameters.
 * --- Query Properties ---
 * @property {string} cmd - 命令（Set/Clear/Call） (Required).
 * @property {number} id - 预置点ID（1-255） (Required).
 * @property {string} name - 预置点名称（最大64位） (Required).
 * @returns {Promise<any>} A promise resolving with the API response.
 */
export function getPreset(query) {
  return request({
    url: '/api/control/preset',
    method: 'get',
    params: query
  })
}

/**
 * 云台控制-预置点配置接口 (POST)
 * @param {object} data - Request payload (Structure based on documentation).
 * --- Data Properties ---
 * @property {string} cmd - 命令（Set/Clear/Call） (Required).
 * @property {number} id - 预置点ID（1-255） (Required).
 * @property {string} name - 预置点名称（最大64位） (Required).
 * @returns {Promise<any>} A promise resolving with the API response.
 */
export function postPreset(data) {
  return request({
    url: '/api/control/preset',
    method: 'post',
    data: data
  })
}
export function exportStatus(data) {
  return request({
    url: '/api/operations/exportStatus',
    method: 'post',
    data: data,
    timeout: 15000
  })
}
export function getsshConfig(data) {
  return request({
    url: '/api/operations/sshSetting',
    method: 'get',
  })
}
export function postsshConfig(data) {
  return request({
    url: '/api/operations/sshSetting',
    method: 'post',
    data: data
  })
}

/**
 * 云台控制-方向（非透传） (GET)
 * @param {object} [query] - Optional query parameters.
 * --- Query Properties ---
 * @property {string} cmd - 方向（Up/Down/Left/Right/UpLeft/UpRight/DownLeft/DownRight） (Required).
 * @property {number} speed - 速度 (Required).
 * @returns {Promise<any>} A promise resolving with the API response.
 */
export function getDirect(query) {
  return request({
    url: '/api/control/direct',
    method: 'get',
    params: query
  })
}
export function getCapabilities(query) {
  return request({
    url: '/api/system/capabilities',
    method: 'get',
    params: query
  })
}

/**
 * 云台控制-方向（非透传） (POST)
 * @param {object} data - Request payload (Structure based on documentation).
 * --- Data Properties ---
 * @property {string} cmd - 方向（Up/Down/Left/Right/UpLeft/UpRight/DownLeft/DownRight） (Required).
 * @property {number} speed - 速度 (Required).
 * @returns {Promise<any>} A promise resolving with the API response.
 */
export function postDirect(data) {
  return request({
    url: '/api/control/direct',
    method: 'post',
    data: data
  })
}

/**
 * 云台控制-缩放 (GET)
 * @param {object} [query] - Optional query parameters.
 * --- Query Properties ---
 * @property {string} cmd - 缩放(In/Out/Stop) (Required).
 * @returns {Promise<any>} A promise resolving with the API response.
 */
export function getZoom(query) {
  return request({
    url: '/api/control/zoom',
    method: 'get',
    params: query
  })
}

/**
 * 云台控制-缩放 (POST)
 * @param {object} data - Request payload (Structure based on documentation).
 * --- Data Properties ---
 * @property {string} cmd - 缩放(In/Out/Stop) (Required).
 * @returns {Promise<any>} A promise resolving with the API response.
 */
export function postZoom(data) {
  return request({
    url: '/api/control/zoom',
    method: 'post',
    data: data
  })
}

/**
 * 云台控制-聚焦 (GET)
 * @param {object} [query] - Optional query parameters.
 * --- Query Properties ---
 * @property {string} cmd - 聚焦(Auto/Far/Near/Stop) (Required).
 * @returns {Promise<any>} A promise resolving with the API response.
 */
export function getFocus(query) {
  return request({
    url: '/api/control/focus',
    method: 'get',
    params: query
  })
}

/**
 * 云台控制-聚焦 (POST)
 * @param {object} data - Request payload (Structure based on documentation).
 * --- Data Properties ---
 * @property {string} cmd - 聚焦(Auto/Far/Near/Stop) (Required).
 * @returns {Promise<any>} A promise resolving with the API response.
 */
export function postFocus(data) {
  return request({
    url: '/api/control/focus',
    method: 'post',
    data: data
  })
}

/**
 * 停止接口 (GET)
 * @param {object|undefined} [query] - Optional query parameters.
 * @returns {Promise<any>} A promise resolving with the API response.
 */
export function getStop(query) {
  return request({
    url: '/api/control/stop',
    method: 'get',
    params: query
  })
}

/**
 * 停止接口 (POST)
 * @param {object} data - Request payload (Payload structure not specified in docs).
 * @returns {Promise<any>} A promise resolving with the API response.
 */
export function postStop(data) {
  return request({
    url: '/api/control/stop',
    method: 'post',
    data: data
  })
}

/**
 * 预置位查询接口 (GET)
 * @param {object|undefined} [query] - Optional query parameters.
 * @returns {Promise<any>} A promise resolving with the API response.
 */
export function getQueryPreset(query) {
  return request({
    url: '/api/control/queryPreset',
    method: 'get',
    params: query
  })
}

/**
 * 预置位查询接口 (POST)
 * @param {object} data - Request payload (Payload structure not specified in docs).
 * @returns {Promise<any>} A promise resolving with the API response.
 */
export function postQueryPreset(data) {
  return request({
    url: '/api/control/queryPreset',
    method: 'post',
    data: data
  })
}

/**
 * 设置点测温参数接口 (GET)
 * @param {object} [query] - Optional query parameters.
 * --- Query Properties ---
 * @property {string} operate - 操作类型(add,update,del) (Required).
 * @property {number} id - 点编号 (Required).
 * @property {number} coordX - x坐标 (Required).
 * @property {number} coordY - y坐标 (Required).
 * @property {boolean} referFlag - 参考标记 (Required).
 * @property {boolean} validFlag - 有效标记 (Required).
 * @property {number} radiance100 - 辐射率[1~100] (Required).
 * @property {number} distance100 - 距离 (Required).
 * @property {number} temp100 - 温度 (Required).
 * @property {number} tempGain - 温度增益倍数[0~100] (Required).
 * @property {number} radTableSwitch - 辐射率/辐射表[0,1] (Required).
 * @property {number} radTableId - 辐射编号 (Required).
 * @property {number} radTableValue100 - 辐射值 (Required).
 * @property {string} name - 名称 (Required).
 * @returns {Promise<any>} A promise resolving with the API response.
 */
export function getMeasurePoint(query) {
  return request({
    url: '/api/measure/measurePoint',
    method: 'get',
    params: query
  })
}

/**
 * 设置点测温参数接口 (POST)
 * @param {object} data - Request payload (Structure based on documentation).
 * --- Data Properties ---
 * @property {string} operate - 操作类型(add,update,del) (Required).
 * @property {number} id - 点编号 (Required).
 * @property {number} coordX - x坐标 (Required).
 * @property {number} coordY - y坐标 (Required).
 * @property {boolean} referFlag - 参考标记 (Required).
 * @property {boolean} validFlag - 有效标记 (Required).
 * @property {number} radiance100 - 辐射率[1~100] (Required).
 * @property {number} distance100 - 距离 (Required).
 * @property {number} temp100 - 温度 (Required).
 * @property {number} tempGain - 温度增益倍数[0~100] (Required).
 * @property {number} radTableSwitch - 辐射率/辐射表[0,1] (Required).
 * @property {number} radTableId - 辐射编号 (Required).
 * @property {number} radTableValue100 - 辐射值 (Required).
 * @property {string} name - 名称 (Required).
 * @returns {Promise<any>} A promise resolving with the API response.
 */
export function postMeasurePoint(data) {
  return request({
    url: '/api/measure/measurePoint',
    method: 'post',
    data: data
  })
}

/**
 * 设置线测温参数接口 (GET)
 * @param {object} [query] - Optional query parameters.
 * --- Query Properties ---
 * @property {number} id - 线测温编号[1~20] (Required).
 * @property {number} coordStartX - 坐标x (Required).
 * @property {number} coordStartY - 坐标y (Required).
 * @property {number} coordEndX - 终点坐标x (Required).
 * @property {number} coordEndY - 终点坐标y (Required).
 * @property {number} referFlag - 参考标记 (Required).
 * @property {number} validFlag - 有效标记 (Required).
 * @property {number} radiance100 - 辐射率100倍值[0~100] (Required).
 * @property {number} distance100 - 距离 (Required).
 * @property {number} tempType - 测温类型(0=最高温，1=最低温，2=平均温) (Required).
 * @property {number} reflectTemp100 - 反射温度 (Required).
 * @property {number} radTableSwitch - 辐射率表开关 (Required).
 * @property {number} radTableId - 辐射编号 (Required).
 * @property {number} radTableValue100 - 辐射值 (Required).
 * @property {number} referTempType - 参考温度类型[0:最高温1: 最低温 2:平均温] (Required).
 * @property {number} tempGain - 温度增益倍数(0-100倍 1-10倍) (Required).
 * @property {string} name - 名称 (Required).
 * @returns {Promise<any>} A promise resolving with the API response.
 */
export function getMeasureLine(query) {
  return request({
    url: '/api/measure/measureLine',
    method: 'get',
    params: query
  })
}

/**
 * 设置线测温参数接口 (POST)
 * @param {object} data - Request payload (Structure based on documentation).
 * --- Data Properties ---
 * @property {number} id - 线测温编号[1~20] (Required).
 * @property {number} coordStartX - 坐标x (Required).
 * @property {number} coordStartY - 坐标y (Required).
 * @property {number} coordEndX - 终点坐标x (Required).
 * @property {number} coordEndY - 终点坐标y (Required).
 * @property {number} referFlag - 参考标记 (Required).
 * @property {number} validFlag - 有效标记 (Required).
 * @property {number} radiance100 - 辐射率100倍值[0~100] (Required).
 * @property {number} distance100 - 距离 (Required).
 * @property {number} tempType - 测温类型(0=最高温，1=最低温，2=平均温) (Required).
 * @property {number} reflectTemp100 - 反射温度 (Required).
 * @property {number} radTableSwitch - 辐射率表开关 (Required).
 * @property {number} radTableId - 辐射编号 (Required).
 * @property {number} radTableValue100 - 辐射值 (Required).
 * @property {number} referTempType - 参考温度类型[0:最高温1: 最低温 2:平均温] (Required).
 * @property {number} tempGain - 温度增益倍数(0-100倍 1-10倍) (Required).
 * @property {string} name - 名称 (Required).
 * @returns {Promise<any>} A promise resolving with the API response.
 */
export function postMeasureLine(data) {
  return request({
    url: '/api/measure/measureLine',
    method: 'post',
    data: data
  })
}

export function measureClear(data) {
  return request({
    url: '/api/measure/measureClear',
    method: 'post',
    data: data
  })
}

/**
 * 区域测温参数配置接口 (GET)
 * @param {object} [query] - Optional query parameters.
 * --- Query Properties ---
 * @property {number} id - 区域编号[1~20] (Required).
 * @property {number} coordX - 起点坐标x(左上角) (Required).
 * @property {number} coordY - 起点坐标y(左上角) (Required).
 * @property {number} rectWide - 区域的宽度 (Required).
 * @property {number} rectHigh - 区域的高度 (Required).
 * @property {boolean} referFlag - 参考标记 (Required).
 * @property {boolean} vaildFlag - 有效标记 (Required).
 * @property {number} radiance100 - 辐射率 (Required).
 * @property {number} distance100 - 辐射距离 (Required).
 * @property {number} reflectTemp100 - 反射温度 (Required).
 * @property {number} radTableSwitch - 类型(0-辐射率,1-辐射率表) (Required).
 * @property {number} radTableId - 辐射id (Required).
 * @property {number} radTableValue100 - 辐射值 (Required).
 * @property {number} tempType - 区域测温类型(0-最高温，1-最低温，2-平均温) (Required).
 * @property {number} referTempType - 参考测温类型(0-最高温,1-最低温, 2-平均温) (Required).
 * @property {string} name - 昵称 (Required).
 * @returns {Promise<any>} A promise resolving with the API response.
 */
export function getMeasureRect(query) {
  return request({
    url: '/api/measure/measureRect',
    method: 'get',
    params: query
  })
}

/**
 * 区域测温参数配置接口 (POST)
 * @param {object} data - Request payload (Structure based on documentation).
 * --- Data Properties ---
 * @property {number} id - 区域编号[1~20] (Required).
 * @property {number} coordX - 起点坐标x(左上角) (Required).
 * @property {number} coordY - 起点坐标y(左上角) (Required).
 * @property {number} rectWide - 区域的宽度 (Required).
 * @property {number} rectHigh - 区域的高度 (Required).
 * @property {boolean} referFlag - 参考标记 (Required).
 * @property {boolean} vaildFlag - 有效标记 (Required).
 * @property {number} radiance100 - 辐射率 (Required).
 * @property {number} distance100 - 辐射距离 (Required).
 * @property {number} reflectTemp100 - 反射温度 (Required).
 * @property {number} radTableSwitch - 类型(0-辐射率,1-辐射率表) (Required).
 * @property {number} radTableId - 辐射id (Required).
 * @property {number} radTableValue100 - 辐射值 (Required).
 * @property {number} tempType - 区域测温类型(0-最高温，1-最低温，2-平均温) (Required).
 * @property {number} referTempType - 参考测温类型(0-最高温,1-最低温, 2-平均温) (Required).
 * @property {string} name - 昵称 (Required).
 * @returns {Promise<any>} A promise resolving with the API response.
 */
export function postMeasureRect(data) {
  return request({
    url: '/api/measure/measureRect',
    method: 'post',
    data: data
  })
}

/**
 * 测温参数配置接口 (GET)
 * @param {object} [query] - Optional query parameters.
 * --- Query Properties ---
 * @property {number} radiance100 - 辐射率 (Required).
 * @property {number} distance100 - 距离 (Required).
 * @property {number} humidity100 - 相对湿度 (Required).
 * @property {number} reflectTemp100 - 加反射温度 (Required).
 * @property {number} transmission100 - 透射率100倍 (Required).
 * @property {number} ambientTempManu100 - 环境温度100倍 (Required).
 * @property {number} radTableSwitch - 辐射类型(0-辐射率,1-辐射率表) (Required).
 * @property {number} radTableId - id (Required).
 * @property {number} radTableValue100 - 辐射值 (Required).
 * @returns {Promise<any>} A promise resolving with the API response.
 */
export function getMeasureParam(query) {
  return request({
    url: '/api/measure/measureParam',
    method: 'get',
    params: query
  })
}

/**
 * 测温参数配置接口 (POST)
 * @param {object} data - Request payload (Structure based on documentation).
 * --- Data Properties ---
 * @property {number} radiance100 - 辐射率 (Required).
 * @property {number} distance100 - 距离 (Required).
 * @property {number} humidity100 - 相对湿度 (Required).
 * @property {number} reflectTemp100 - 加反射温度 (Required).
 * @property {number} transmission100 - 透射率100倍 (Required).
 * @property {number} ambientTempManu100 - 环境温度100倍 (Required).
 * @property {number} radTableSwitch - 辐射类型(0-辐射率,1-辐射率表) (Required).
 * @property {number} radTableId - id (Required).
 * @property {number} radTableValue100 - 辐射值 (Required).
 * @returns {Promise<any>} A promise resolving with the API response.
 */
export function postMeasureParam(data) {
  return request({
    url: '/api/measure/measureParam',
    method: 'post',
    data: data
  })
}

/**
 * 获取/设置OSD参数 (GET)
 * @param {object} [query] - Optional query parameters.
 * --- Query Properties ---
 * @property {number} enabled - 是否开启测温 (Required).
 * @property {number} showColorRuler - 是否显示色标 (Required).
 * @property {number} showMaxTemp - 是否显示最高温 (Required).
 * @property {number} showMinTemo - 是否显示最低温 (Required).
 * @property {number} showAvgTemo - 是否显示平均温 (Required).
 * @property {number} showEmissivity - 是否显示辐射率 (Required).
 * @property {number} showRulerName - 是否显示规则名称 (Required).
 * @property {string} tempUnit - 温度单位(Celsius-摄氏度/Fahrenheit-华氏度/kelvin-开尔文) (Required).
 * @property {number} tempRange - 测温档位（1-（-20~150），2-（100~600）） (Required).
 * @property {string} tempAlgVersion - 测温算法版本 (Required).
 * @returns {Promise<any>} A promise resolving with the API response.
 */
export function getBasicConfig(query) {
  return request({
    url: '/api/measure/basicConfig',
    method: 'get',
    params: query
  })
}

/**
 * 获取/设置OSD参数 (POST)
 * @param {object} data - Request payload (Structure based on documentation).
 * --- Data Properties ---
 * @property {number} enabled - 是否开启测温 (Required).
 * @property {number} showColorRuler - 是否显示色标 (Required).
 * @property {number} showMaxTemp - 是否显示最高温 (Required).
 * @property {number} showMinTemo - 是否显示最低温 (Required).
 * @property {number} showAvgTemo - 是否显示平均温 (Required).
 * @property {number} showEmissivity - 是否显示辐射率 (Required).
 * @property {number} showRulerName - 是否显示规则名称 (Required).
 * @property {string} tempUnit - 温度单位(Celsius-摄氏度/Fahrenheit-华氏度/kelvin-开尔文) (Required).
 * @property {number} tempRange - 测温档位（1-（-20~150），2-（100~600）） (Required).
 * @property {string} tempAlgVersion - 测温算法版本 (Required).
 * @returns {Promise<any>} A promise resolving with the API response.
 */
export function postBasicConfig(data) {
  return request({
    url: '/api/measure/basicConfig',
    method: 'post',
    data: data
  })
}

/**
 * 测温报警配置接口 (GET)
 * @param {object} [query] - Optional query parameters.
 * --- Query Properties ---
 * @property {number} id - 点线框id (Required).
 * @property {string} type - 点线框类型（point,line,rect） (Required).
 * @property {string} rule - 规则（最高温高于-maxGreater，最高温低于-maxLesser, 最低温高于-minGreater, 最低温低于-minLesser, 平均温高于-avgGreater,平均温低于-avgLesser (Required).
 * @property {number} threshold - 容错温度(防止温度来回震荡) (Required).
 * @property {number} alert - 预警温度 (Required).
 * @property {number} alertFilterTime - 预警过滤时间 (Required).
 * @property {number} alarm - 报警温度 (Required).
 * @property {number} alarmFilterTime - 报警过滤时间 (Required).
 * @returns {Promise<any>} A promise resolving with the API response.
 */
export function getThermalAlarmConfig(query) {
  return request({
    url: '/api/measure/measureAlarmConfig',
    method: 'get',
    params: query
  })
}

/**
 * 测温报警配置接口 (POST)
 * @param {object} data - Request payload (Structure based on documentation).
 * --- Data Properties ---
 * @property {number} id - 点线框id (Required).
 * @property {string} type - 点线框类型（point,line,rect） (Required).
 * @property {string} rule - 规则（最高温高于-maxGreater，最高温低于-maxLesser, 最低温高于-minGreater, 最低温低于-minLesser, 平均温高于-avgGreater,平均温低于-avgLesser (Required).
 * @property {number} threshold - 容错温度(防止温度来回震荡) (Required).
 * @property {number} alert - 预警温度 (Required).
 * @property {number} alertFilterTime - 预警过滤时间 (Required).
 * @property {number} alarm - 报警温度 (Required).
 * @property {number} alarmFilterTime - 报警过滤时间 (Required).
 * @returns {Promise<any>} A promise resolving with the API response.
 */
export function postThermalAlarmConfig(data) {
  return request({
    url: '/api/measure/measureAlarmConfig',
    method: 'post',
    data: data
  })
}

/**
 * 测温报警布防配置接口 (GET)
 * @param {object|undefined} [query] - Optional query parameters.
 * @returns {Promise<any>} A promise resolving with the API response.
 */
export function getAlarmArmingConfig(query) {
  return request({
    url: '/api/measure/measureAlarmScheduleConfig',
    method: 'get',
    params: query
  })
}

/**
 * 测温报警布防配置接口 (POST)
 * @param {object} data - Request payload (Payload structure not specified in docs).
 * @returns {Promise<any>} A promise resolving with the API response.
 */
export function postAlarmArmingConfig(data) {
  return request({
    url: '/api/measure/measureAlarmScheduleConfig',
    method: 'post',
    data: data
  })
}

/**
 * 获取报警布防计划接口 (GET)
 * @param {object} [query] - Optional query parameters.
 * --- Query Properties ---
 * @property {string} eventType - 事件类型(normal/thermometry) (Required).
 * @returns {Promise<any>} A promise resolving with the API response.
 */
export function getAlarmArmingScheduleConfig(query) {
  return request({
    url: '/api/system/measureAlarmScheduleConfig',
    method: 'get',
    params: query
  })
}

/**
 * 获取报警布防计划接口 (POST)
 * @param {object} data - Request payload (Structure based on documentation).
 * --- Data Properties ---
 * @property {string} eventType - 事件类型(normal/thermometry) (Required).
 * @returns {Promise<any>} A promise resolving with the API response.
 */
export function postAlarmArmingScheduleConfig(data) {
  return request({
    url: '/api/system/measureAlarmScheduleConfig',
    method: 'post',
    data: data
  })
}

/**
 * 测温报警联动接口 (GET)
 * @param {object} [query] - Optional query parameters.
 * --- Query Properties ---
 * @property {number} uploadCenter - 是否上传中心 (Required).
 * @property {number} outputIOPort - 是否联动输出到IO口 (Required).
 * @returns {Promise<any>} A promise resolving with the API response.
 */
export function getThermalAlarmTrigger(query) {
  return request({
    url: '/api/measure/measureAlarmLinkage',
    method: 'get',
    params: query
  })
}

/**
 * 测温报警联动接口 (POST)
 * @param {object} data - Request payload (Structure based on documentation).
 * --- Data Properties ---
 * @property {number} uploadCenter - 是否上传中心 (Required).
 * @property {number} outputIOPort - 是否联动输出到IO口 (Required).
 * @returns {Promise<any>} A promise resolving with the API response.
 */
export function postThermalAlarmTrigger(data) {
  return request({
    url: '/api/measure/measureAlarmLinkage',
    method: 'post',
    data: data
  })
}

/**
 * 获取设备信息接口 (GET)
 * @param {object|undefined} [query] - Optional query parameters.
 * @returns {Promise<object>} A promise resolving with the API response.
 * --- Response Properties (resolved object) ---
 * @property {string} softVersion - 应用程序版本.
 * @property {string} hardVersion - 硬件版本.
 * @property {string} FPGAVersion - fpga程序版本.
 * @property {number} tempAlgVersion - 测温算法版本.
 * @property {number} imageAlgVersion - 图像算法版本.
 * @property {string} deviceModel - 设备型号.
 * @property {string} serialNumber - 设备序列号.
 * @property {string} productDate - 生产日期.
 * @property {string} startTime - 启动时间.
 */
export function getDeviceInfo(query) {
  return request({
    url: '/api/system/deviceInfo',
    method: 'get',
    params: query
  })
}

/**
 * 获取设备信息接口 (POST)
 * @param {object} data - Request payload (Payload structure not specified in docs).
 * @returns {Promise<object>} A promise resolving with the API response.
 * --- Response Properties (resolved object) ---
 * @property {string} softVersion - 应用程序版本.
 * @property {string} hardVersion - 硬件版本.
 * @property {string} FPGAVersion - fpga程序版本.
 * @property {number} tempAlgVersion - 测温算法版本.
 * @property {number} imageAlgVersion - 图像算法版本.
 * @property {string} deviceModel - 设备型号.
 * @property {string} serialNumber - 设备序列号.
 * @property {string} productDate - 生产日期.
 * @property {string} startTime - 启动时间.
 */
export function postDeviceInfo(data) {
  return request({
    url: '/api/system/deviceInfo',
    method: 'post',
    data: data
  })
}

/**
 * 设置时间 (GET)
 * @param {object} [query] - Optional query parameters.
 * --- Query Properties ---
 * @property {string} timeMode - 时间模式(NTP/manual) (Required).
 * @property {string} timeZone - 时区 (Required).
 * @property {string | undefined} localTime - 设备时间(manual可选) (Optional).
 * @property {string | undefined} ntpServerAddress - ntp服务器地址(ntp校时使用) (Optional).
 * @property {number | undefined} ntpServerPort - ntp服务器端口(ntp校时使用) (Optional).
 * @property {number | undefined} ntpSyncInterval - ntp校时间隔(ntp校时使用) (Optional).
 * @returns {Promise<any>} A promise resolving with the API response.
 */
export function getTime(query) {
  return request({
    url: '/api/system/time',
    method: 'get',
    params: query
  })
}

/**
 * 设置时间 (POST)
 * @param {object} data - Request payload (Structure based on documentation).
 * --- Data Properties ---
 * @property {string} timeMode - 时间模式(NTP/manual) (Required).
 * @property {string} timeZone - 时区 (Required).
 * @property {string | undefined} localTime - 设备时间(manual可选) (Optional).
 * @property {string | undefined} ntpServerAddress - ntp服务器地址(ntp校时使用) (Optional).
 * @property {number | undefined} ntpServerPort - ntp服务器端口(ntp校时使用) (Optional).
 * @property {number | undefined} ntpSyncInterval - ntp校时间隔(ntp校时使用) (Optional).
 * @returns {Promise<any>} A promise resolving with the API response.
 */
export function postTime(data) {
  return request({
    url: '/api/system/time',
    method: 'post',
    data: data
  })
}

/**
 * 设置网络信息接口 (GET)
 * @param {object} [query] - Optional query parameters.
 * --- Query Properties ---
 * @property {string} addressType - 地址类型(static-静态,dhcp-动态dhcp) (Required).
 * @property {string} ipAddress - ip地址 (Required).
 * @property {string} subnetMask - 子网掩码 (Required).
 * @property {string} defaultGateway - 默认网关 (Required).
 * @property {string} primaryDNS - 首选DNS (Required).
 * @property {string} SecondaryDNS - 备选DNS (Required).
 * @returns {Promise<any>} A promise resolving with the API response.
 */
export function getNetConfig(query) {
  return request({
    url: '/api/system/netConfig',
    method: 'get',
    params: query
  })
}

/**
 * 设置网络信息接口 (POST)
 * @param {object} data - Request payload (Structure based on documentation).
 * --- Data Properties ---
 * @property {string} addressType - 地址类型(static-静态,dhcp-动态dhcp) (Required).
 * @property {string} ipAddress - ip地址 (Required).
 * @property {string} subnetMask - 子网掩码 (Required).
 * @property {string} defaultGateway - 默认网关 (Required).
 * @property {string} primaryDNS - 首选DNS (Required).
 * @property {string} SecondaryDNS - 备选DNS (Required).
 * @returns {Promise<any>} A promise resolving with the API response.
 */
export function postNetConfig(data) {
  return request({
    url: '/api/system/netConfig',
    method: 'post',
    data: data
  })
}

/**
 * 获取端口配置接口 (GET)
 * @param {object|undefined} [query] - Optional query parameters.
 * @returns {Promise<object>} A promise resolving with the API response.
 * --- Response Properties (resolved object) ---
 * @property {number} svrPort - 应用程序监听端口.
 * @property {number} rtspPort - rtsp服务监听端口.
 */
export function getPortsConfig(query) {
  return request({
    url: '/api/system/portsConfig',
    method: 'get',
    params: query
  })
}

/**
 * 获取端口配置接口 (POST)
 * @param {object} data - Request payload (Payload structure not specified in docs).
 * @returns {Promise<object>} A promise resolving with the API response.
 * --- Response Properties (resolved object) ---
 * @property {number} svrPort - 应用程序监听端口.
 * @property {number} rtspPort - rtsp服务监听端口.
 */
export function postPortsConfig(data) {
  return request({
    url: '/api/system/portsConfig',
    method: 'post',
    data: data
  })
}

/**
 * 格式化sd卡接口 (GET)
 * @param {object|undefined} [query] - Optional query parameters.
 * @returns {Promise<any>} A promise resolving with the API response.
 */
export function getSdcardFormat(query) {
  return request({
    url: '/api/system/sdcardFormat',
    method: 'get',
    params: query
  })
}

/**
 * 格式化sd卡接口 (POST)
 * @param {object} data - Request payload (Payload structure not specified in docs).
 * @returns {Promise<any>} A promise resolving with the API response.
 */
export function postSdcardFormat(data) {
  return request({
    url: '/api/system/sdcardFormat',
    method: 'post',
    data: data
  })
}

/**
 * 获取sd卡信息接口 (GET)
 * @param {object|undefined} [query] - Optional query parameters.
 * @returns {Promise<object>} A promise resolving with the API response.
 * --- Response Properties (resolved object) ---
 * @property {number} groupid - 用户组id，1：超级管理员；2：普通用户.
 */
export function getSdcardInfo(query) {
  return request({
    url: '/api/system/sdcardInfo',
    method: 'get',
    params: query
  })
}

/**
 * 获取sd卡信息接口 (POST)
 * @param {object} data - Request payload (Payload structure not specified in docs).
 * @returns {Promise<object>} A promise resolving with the API response.
 * --- Response Properties (resolved object) ---
 * @property {number} groupid - 用户组id，1：超级管理员；2：普通用户.
 */
export function postSdcardInfo(data) {
  return request({
    url: '/api/system/sdcardInfo',
    method: 'post',
    data: data
  })
}

/**
 * RS485参数配置 (GET)
 * @param {object} [query] - Optional query parameters.
 * --- Query Properties ---
 * @property {number} enable - 启用状态（0-关闭，1-开启） (Required).
 * @property {number} mode - 控制模式（0-透传，1-云台，2-LED） (Required).
 * @property {number} baudRate - 波特率（1200/2400/4800/9600/19200/38400/57600/115200） (Required).
 * @property {number} dataBits - 数据位（5/6/7/8） (Required).
 * @property {number} stopBits - 停止位（1/2） (Required).
 * @property {string} parityType - 奇偶校验(none/odd/even) (Required).
 * @property {string} flowCtrl - 流控(none) (Required).
 * @property {number} decAddr - 解码设备地址 (Required).
 * @returns {Promise<any>} A promise resolving with the API response.
 */
export function getRs485Config(query) {
  return request({
    url: '/api/system/rs485Config',
    method: 'get',
    params: query
  })
}

/**
 * RS485参数配置 (POST)
 * @param {object} data - Request payload (Structure based on documentation).
 * --- Data Properties ---
 * @property {number} enable - 启用状态（0-关闭，1-开启） (Required).
 * @property {number} mode - 控制模式（0-透传，1-云台，2-LED） (Required).
 * @property {number} baudRate - 波特率（1200/2400/4800/9600/19200/38400/57600/115200） (Required).
 * @property {number} dataBits - 数据位（5/6/7/8） (Required).
 * @property {number} stopBits - 停止位（1/2） (Required).
 * @property {string} parityType - 奇偶校验(none/odd/even) (Required).
 * @property {string} flowCtrl - 流控(none) (Required).
 * @property {number} decAddr - 解码设备地址 (Required).
 * @returns {Promise<any>} A promise resolving with the API response.
 */
export function postRs485Config(data) {
  return request({
    url: '/api/system/rs485Config',
    method: 'post',
    data: data
  })
}

/**
 * 系统重启接口 (GET)
 * @param {object|undefined} [query] - Optional query parameters.
 * @returns {Promise<any>} A promise resolving with the API response.
 */
export function getReboot(query) {
  return request({
    url: '/api/operations/reboot',
    method: 'get',
    params: query
  })
}

/**
 * 系统重启接口 (POST)
 * @param {object} data - Request payload (Payload structure not specified in docs).
 * @returns {Promise<any>} A promise resolving with the API response.
 */
export function postReboot(data) {
  return request({
    url: '/api/operations/reboot',
    method: 'post',
    data: data
  })
}

/**
 * 恢复出厂设置接口 (GET)
 * @param {object|undefined} [query] - Optional query parameters.
 * @returns {Promise<any>} A promise resolving with the API response.
 */
export function getRestoreDefaultSetting(query) {
  return request({
    url: '/api/operations/restoreDefaultSetting',
    method: 'get',
    params: query
  })
}

/**
 * 恢复出厂设置接口 (POST)
 * @param {object} data - Request payload (Payload structure not specified in docs).
 * @returns {Promise<any>} A promise resolving with the API response.
 */
export function postRestoreDefaultSetting(data) {
  return request({
    url: '/api/operations/restoreDefaultSetting',
    method: 'post',
    data: data
  })
}

/**
 * 恢复设置接口 (GET)
 * @param {object|undefined} [query] - Optional query parameters.
 * @returns {Promise<any>} A promise resolving with the API response.
 */
export function getRestoreSetting(query) {
  return request({
    url: '/api/operations/restoreSetting',
    method: 'get',
    params: query
  })
}

/**
 * 恢复设置接口 (POST)
 * @param {object} data - Request payload (Payload structure not specified in docs).
 * @returns {Promise<any>} A promise resolving with the API response.
 */
export function postRestoreSetting(data) {
  return request({
    url: '/api/operations/restoreSetting',
    method: 'post',
    data: data
  })
}

/**
 * 升级应用程序接口 (GET)
 * @param {object} [query] - Optional query parameters.
 * --- Query Properties ---
 * @property {string} filename - 升级文件名 (Required).
 * @returns {Promise<any>} A promise resolving with the API response.
 */
export function getUpgradeApp(query) {
  return request({
    url: '/api/operations/upgradeApp',
    method: 'get',
    params: query
  })
}

/**
 * 升级应用程序接口 (POST)
 * @param {object} data - Request payload (Structure based on documentation).
 * --- Data Properties ---
 * @property {string} filename - 升级文件名 (Required).
 * @returns {Promise<any>} A promise resolving with the API response.
 */
export function postUpgradeApp(data) {
  return request({
    url: '/api/operations/upgradeApp',
    method: 'post',
    data: data
  })
}

/**
 * FPGA文件升级接口 (GET)
 * @param {object} [query] - Optional query parameters.
 * --- Query Properties ---
 * @property {string} filename - 文件名 (Required).
 * @returns {Promise<any>} A promise resolving with the API response.
 */
export function getUpgradeFpga(query) {
  return request({
    url: '/api/operations/upgradeFpga',
    method: 'get',
    params: query
  })
}

/**
 * FPGA文件升级接口 (POST)
 * @param {object} data - Request payload (Structure based on documentation).
 * --- Data Properties ---
 * @property {string} filename - 文件名 (Required).
 * @returns {Promise<any>} A promise resolving with the API response.
 */
export function postUpgradeFpga(data) {
  return request({
    url: '/api/operations/upgradeFpga',
    method: 'post',
    data: data
  })
}

/**
 * 定时自动重启接口 (GET)
 * @param {object} [query] - Optional query parameters.
 * --- Query Properties ---
 * @property {number} enable - 启用（0-未启用，1-启用） (Required).
 * @property {number} dayOfWeek - 一周的第几天（周一~周日） (Required).
 * @property {string} rebootTime - 重启时间（02:00:00） (Required).
 * @returns {Promise<any>} A promise resolving with the API response.
 */
export function getAutoReboot(query) {
  return request({
    url: '/api/operations/autoReboot',
    method: 'get',
    params: query
  })
}

/**
 * 定时自动重启接口 (POST)
 * @param {object} data - Request payload (Structure based on documentation).
 * --- Data Properties ---
 * @property {number} enable - 启用（0-未启用，1-启用） (Required).
 * @property {number} dayOfWeek - 一周的第几天（周一~周日） (Required).
 * @property {string} rebootTime - 重启时间（02:00:00） (Required).
 * @returns {Promise<any>} A promise resolving with the API response.
 */
export function postAutoReboot(data) {
  return request({
    url: '/api/operations/autoReboot',
    method: 'post',
    data: data
  })
}

/**
 * ssh配置接口 (GET)
 * @param {object} [query] - Optional query parameters.
 * --- Query Properties ---
 * @property {number} enable - 启用（0-关闭，1-打开） (Required).
 * @returns {Promise<any>} A promise resolving with the API response.
 */
export function getSshConfig(query) {
  return request({
    url: '/api/operations/sshConfig',
    method: 'get',
    params: query
  })
}

/**
 * ssh配置接口 (POST)
 * @param {object} data - Request payload (Structure based on documentation).
 * --- Data Properties ---
 * @property {number} enable - 启用（0-关闭，1-打开） (Required).
 * @returns {Promise<any>} A promise resolving with the API response.
 */
export function postSshConfig(data) {
  return request({
    url: '/api/operations/sshConfig',
    method: 'post',
    data: data
  })
}

/**
 * 视频参数配置接口 (GET)
 * @param {object|undefined} [query] - Optional query parameters.
 * @returns {Promise<object>} A promise resolving with the API response.
 * --- Response Properties (resolved object) ---
 * @property {any} codecType - string.
 * @property {any} width - int.
 * @property {any} height - int.
 * @property {any} frameRate - int 帧率.
 * @property {any} streamType - int.
 * @property {any} upperBitrate - string.
 */
export function getVideoParam(query) {
  return request({
    url: '/api/video/videoParam',
    method: 'get',
    params: query
  })
}

/**
 * 视频参数配置接口 (POST)
 * @param {object} data - Request payload (Payload structure not specified in docs).
 * @returns {Promise<object>} A promise resolving with the API response.
 * --- Response Properties (resolved object) ---
 * @property {any} codecType - string.
 * @property {any} width - int.
 * @property {any} height - int.
 * @property {any} frameRate - int 帧率.
 * @property {any} streamType - int.
 * @property {any} upperBitrate - string.
 */
export function postVideoParam(data) {
  return request({
    url: '/api/video/videoParam',
    method: 'post',
    data: data
  })
}

/**
 * 设置录像计划接口 (GET)
 * @param {object} [query] - Optional query parameters.
 * --- Query Properties ---
 * @property {number | undefined} recordType - 录像类型 (Optional).
 * @property {any | undefined} scheduleAction - 录像计划 (Optional).
 * @property {string | undefined} dayOfWeek - 周几(Monday,Tuesday,Wednesday,Thursday,Friday,Saturday,Sunday) (Optional).
 * @property {number | undefined} id - 编号 (Optional).
 * @property {string | undefined} startTime - 开始时间 (Optional).
 * @property {string | undefined} endTime - 结束时间 (Optional).
 * @returns {Promise<any>} A promise resolving with the API response.
 */
export function getRecordPlan(query) {
  return request({
    url: '/api/video/recordPlan',
    method: 'get',
    params: query
  })
}

/**
 * 设置录像计划接口 (POST)
 * @param {object} data - Request payload (Structure based on documentation).
 * --- Data Properties ---
 * @property {number | undefined} recordType - 录像类型 (Optional).
 * @property {any | undefined} scheduleAction - 录像计划 (Optional).
 * @property {string | undefined} dayOfWeek - 周几(Monday,Tuesday,Wednesday,Thursday,Friday,Saturday,Sunday) (Optional).
 * @property {number | undefined} id - 编号 (Optional).
 * @property {string | undefined} startTime - 开始时间 (Optional).
 * @property {string | undefined} endTime - 结束时间 (Optional).
 * @returns {Promise<any>} A promise resolving with the API response.
 */
export function postRecordPlan(data) {
  return request({
    url: '/api/video/recordPlan',
    method: 'post',
    data: data
  })
}

/**
 * 开始预览接口 (GET)
 * @param {object|undefined} [query] - Optional query parameters.
 * @returns {Promise<any>} A promise resolving with the API response.
 */
export function getStartPreview(query) {
  return request({
    url: '/api/video/startPreview',
    method: 'get',
    params: query
  })
}

/**
 * 开始预览接口 (POST)
 * @param {object} data - Request payload (Payload structure not specified in docs).
 * @returns {Promise<any>} A promise resolving with the API response.
 */
export function postStartPreview() {
  return request({
    url: '/api/video/startPreview',
    method: 'post'
  })
}

/**
 * 停止预览接口 (GET)
 * @param {object|undefined} [query] - Optional query parameters.
 * @returns {Promise<any>} A promise resolving with the API response.
 */
export function getStopPreview(query) {
  return request({
    url: '/api/video/stopPreview',
    method: 'get',
    params: query
  })
}

/**
 * 停止预览接口 (POST)
 * @param {object} data - Request payload (Payload structure not specified in docs).
 * @returns {Promise<any>} A promise resolving with the API response.
 */
export function postStopPreview(data) {
  return request({
    url: '/api/video/stopPreview',
    method: 'post',
    data: data
  })
}

/**
 * 开始录像接口 (GET)
 * @param {object} [query] - Optional query parameters.
 * --- Query Properties ---
 * @property {number | undefined} type - 录像类型[0-全部，1-raw，2-avi] (Optional).
 * @returns {Promise<any>} A promise resolving with the API response.
 */
export function getStartRecord(query) {
  return request({
    url: '/api/video/startRecord',
    method: 'get',
    params: query
  })
}

/**
 * 开始录像接口 (POST)
 * @param {object} data - Request payload (Structure based on documentation).
 * --- Data Properties ---
 * @property {number | undefined} type - 录像类型[0-全部，1-raw，2-avi] (Optional).
 * @returns {Promise<any>} A promise resolving with the API response.
 */
export function postStartRecord(data) {
  return request({
    url: '/api/video/startRecord',
    method: 'post',
    data: data
  })
}

/**
 * 停止录像接口 (GET)
 * @param {object} [query] - Optional query parameters.
 * --- Query Properties ---
 * @property {number | undefined} type - 类型[0-全部，1-raw，2-avi] (Optional).
 * @returns {Promise<any>} A promise resolving with the API response.
 */
export function getStopRecord(query) {
  return request({
    url: '/api/video/stopRecord',
    method: 'get',
    params: query
  })
}

/**
 * 停止录像接口 (POST)
 * @param {object} data - Request payload (Structure based on documentation).
 * --- Data Properties ---
 * @property {number | undefined} type - 类型[0-全部，1-raw，2-avi] (Optional).
 * @returns {Promise<any>} A promise resolving with the API response.
 */
export function postStopRecord(data) {
  return request({
    url: '/api/video/stopRecord',
    method: 'post',
    data: data
  })
}

/**
 * 视频参数设置接口 (GET)
 * @param {object} [query] - Optional query parameters.
 * --- Query Properties ---
 * @property {number} channelID - 通道号 (Required).
 * @property {string} streamType - 码流类型（main/sub） (Required).
 * @property {string} codecType - 编码类型 (Required).
 * @property {string | undefined} name - 昵称 (Optional).
 * @property {string | undefined} name - 昵称 (Optional).
 * @property {string | undefined} name - 昵称 (Optional).
 * @property {string | undefined} name - 昵称 (Optional).
 * @property {string | undefined} name - 昵称 (Optional).
 * @property {string | undefined} name - 昵称 (Optional).
 * @returns {Promise<object>} A promise resolving with the API response.
 * --- Response Properties (resolved object) ---
 * @property {number} groupid - 用户组id，1：超级管理员；2：普通用户.
 */
export function getVideoParams(query) {
  return request({
    url: '/api/system/videoParams',
    method: 'get',
    params: query
  })
}

/**
 * 视频参数设置接口 (POST)
 * @param {object} data - Request payload (Structure based on documentation).
 * --- Data Properties ---
 * @property {number} channelID - 通道号 (Required).
 * @property {string} streamType - 码流类型（main/sub） (Required).
 * @property {string} codecType - 编码类型 (Required).
 * @property {string | undefined} name - 昵称 (Optional).
 * @property {string | undefined} name - 昵称 (Optional).
 * @property {string | undefined} name - 昵称 (Optional).
 * @property {string | undefined} name - 昵称 (Optional).
 * @property {string | undefined} name - 昵称 (Optional).
 * @property {string | undefined} name - 昵称 (Optional).
 * @returns {Promise<object>} A promise resolving with the API response.
 * --- Response Properties (resolved object) ---
 * @property {number} groupid - 用户组id，1：超级管理员；2：普通用户.
 */
export function postVideoParams(data) {
  return request({
    url: '/api/system/videoParams',
    method: 'post',
    data: data
  })
}

/**
 * 获取抓图计划接口 (GET)
 * @param {object|undefined} [query] - Optional query parameters.
 * @returns {Promise<object>} A promise resolving with the API response.
 * --- Response Properties (resolved object) ---
 * @property {boolean} enable - 是否启用.
 * @property {number} recordType - 录像类型.
 * @property {any} scheduleAction - 录像计划.
 * @property {string} dayOfWeek - 周几(Monday,Tuesday,Wednesday,Thursday,Friday,Saturday,Sunday).
 * @property {number} id - 编号(1-8).
 * @property {string} startTime - 开始时间.
 * @property {string} endTime - 结束时间.
 */
export function getSnapshotSchedule(query) {
  return request({
    url: '/api/storage/snapshotScheduleConfig',
    method: 'get',
    params: query
  })
}

/**
 * 获取抓图计划接口 (POST)
 * @param {object} data - Request payload (Payload structure not specified in docs).
 * @returns {Promise<object>} A promise resolving with the API response.
 * --- Response Properties (resolved object) ---
 * @property {boolean} enable - 是否启用.
 * @property {number} recordType - 录像类型.
 * @property {any} scheduleAction - 录像计划.
 * @property {string} dayOfWeek - 周几(Monday,Tuesday,Wednesday,Thursday,Friday,Saturday,Sunday).
 * @property {number} id - 编号(1-8).
 * @property {string} startTime - 开始时间.
 * @property {string} endTime - 结束时间.
 */
export function postSnapshotSchedule(data) {
  return request({
    url: '/api/storage/snapshotScheduleConfig',
    method: 'post',
    data: data
  })
}

/**
 * 抓图参数接口 (GET)
 * @param {object|undefined} [query] - Optional query parameters.
 * @returns {Promise<any>} A promise resolving with the API response.
 */
export function getSnapshotParam(query) {
  return request({
    url: '/api/storage/snapshotParam',
    method: 'get',
    params: query
  })
}

/**
 * 抓图参数接口 (POST)
 * @param {object} data - Request payload (Payload structure not specified in docs).
 * @returns {Promise<any>} A promise resolving with the API response.
 */
export function postSnapshotParam(data) {
  return request({
    url: '/api/storage/snapshotParam',
    method: 'post',
    data: data
  })
}

/**
 * 报警输入接口 (GET)
 * @param {object} [query] - Optional query parameters.
 * --- Query Properties ---
 * @property {number} IOPort - 报警输入的IO端口号 (Required).
 * @property {number} IOType - IO端口类型，1-常开，0-常闭 (Required).
 * @property {string} name - 报警名称 (Required).
 * @property {number} enable - 使能开关，0-关，1-开 (Required).
 * @returns {Promise<any>} A promise resolving with the API response.
 */
export function getAlarmInConfig(query) {
  return request({
    url: '/api/event/alarmInConfig',
    method: 'get',
    params: query
  })
}
export function uploadBigfile(chunkData, config) {
  return request({
    url: '/upload', // The path for the upload endpoint
    method: 'post',
    data: chunkData,
    ...config, // Spread params and headers here
  });
}

/**
 * 报警输入接口 (POST)
 * @param {object} data - Request payload (Structure based on documentation).
 * --- Data Properties ---
 * @property {number} IOPort - 报警输入的IO端口号 (Required).
 * @property {number} IOType - IO端口类型，1-常开，0-常闭 (Required).
 * @property {string} name - 报警名称 (Required).
 * @property {number} enable - 使能开关，0-关，1-开 (Required).
 * @returns {Promise<any>} A promise resolving with the API response.
 */
export function postAlarmInConfig(data) {
  return request({
    url: '/api/event/alarmInConfig',
    method: 'post',
    data: data
  })
}

/**
 * 普通报警输出接口 (GET)
 * @param {object} [query] - Optional query parameters.
 * --- Query Properties ---
 * @property {number} IOPort - 报警输出的IO口 (Required).
 * @property {number} IOType - 报警类型,1-高电平2-低电平 (Required).
 * @property {number} delay - 延时s (Required).
 * @returns {Promise<any>} A promise resolving with the API response.
 */
export function getAlarmOutConfig(query) {
  return request({
    url: '/api/event/alarmOutConfig',
    method: 'get',
    params: query
  })
}

/**
 * 普通报警输出接口 (POST)
 * @param {object} data - Request payload (Structure based on documentation).
 * --- Data Properties ---
 * @property {number} IOPort - 报警输出的IO口 (Required).
 * @property {number} IOType - 报警类型,1-高电平2-低电平 (Required).
 * @property {number} delay - 延时s (Required).
 * @returns {Promise<any>} A promise resolving with the API response.
 */
export function postAlarmOutConfig(data) {
  return request({
    url: '/api/event/alarmOutConfig',
    method: 'post',
    data: data
  })
}

/**
 * 获取报警联动计划接口 (GET)
 * @param {object|undefined} [query] - Optional query parameters.
 * @returns {Promise<object>} A promise resolving with the API response.
 * --- Response Properties (resolved object) ---
 * @property {boolean} enable - 是否启用.
 * @property {number} recordType - 录像类型.
 * @property {any} scheduleAction - 录像计划.
 * @property {string} dayOfWeek - 周几(Monday,Tuesday,Wednesday,Thursday,Friday,Saturday,Sunday).
 * @property {number} id - 编号(1-8).
 * @property {string} startTime - 开始时间.
 * @property {string} endTime - 结束时间.
 */
export function getAlarmInScheduleConfig(query) {
  return request({
    url: '/api/event/alarmInScheduleConfig',
    method: 'get',
    params: query
  })
}

/**
 * 获取报警联动计划接口 (POST)
 * @param {object} data - Request payload (Payload structure not specified in docs).
 * @returns {Promise<object>} A promise resolving with the API response.
 * --- Response Properties (resolved object) ---
 * @property {boolean} enable - 是否启用.
 * @property {number} recordType - 录像类型.
 * @property {any} scheduleAction - 录像计划.
 * @property {string} dayOfWeek - 周几(Monday,Tuesday,Wednesday,Thursday,Friday,Saturday,Sunday).
 * @property {number} id - 编号(1-8).
 * @property {string} startTime - 开始时间.
 * @property {string} endTime - 结束时间.
 */
export function postAlarmInScheduleConfig(data) {
  return request({
    url: '/api/event/alarmInScheduleConfig',
    method: 'post',
    data: data
  })
}
export function getAlarmOutScheduleConfig(data) {
  return request({
    url: '/api/event/alarmOutScheduleConfig',
    method: 'get',
  })
}
export function postAlarmOutScheduleConfig(data) {
  return request({
    url: '/api/event/alarmOutScheduleConfig',
    method: 'post',
    data: data
  })
}

/**
 * 普通报警联动接口 (GET)
 * @param {object} [query] - Optional query parameters.
 * --- Query Properties ---
 * @property {number} uploadCenter - 上传中心（1-是，0-否） (Required).
 * @property {number} alarmOut - 报警端口输出（1-是，0-否） (Required).
 * @returns {Promise<any>} A promise resolving with the API response.
 */
export function getAlarmInTrigger(query) {
  return request({
    url: '/api/event/alarmInLinkage',
    method: 'get',
    params: query
  })
}

/**
 * 普通报警联动接口 (POST)
 * @param {object} data - Request payload (Structure based on documentation).
 * --- Data Properties ---
 * @property {number} uploadCenter - 上传中心（1-是，0-否） (Required).
 * @property {number} alarmOut - 报警端口输出（1-是，0-否） (Required).
 * @returns {Promise<any>} A promise resolving with the API response.
 */
export function postAlarmInTrigger(data) {
  return request({
    url: '/api/event/alarmInLinkage',
    method: 'post',
    data: data
  })
}

/**
 * 修改用户密码信息接口 (GET)
 * @param {object} [query] - Optional query parameters.
 * --- Query Properties ---
 * @property {string} username - 用户名 (Required).
 * @property {string} oldPassword - 旧密码 (Required).
 * @property {string} newPassword - 新密码 (Required).
 * @returns {Promise<any>} A promise resolving with the API response.
 */
export function getModifyUserPassword(query) {
  return request({
    url: '/api/user/modifyUserPassword',
    method: 'get',
    params: query
  })
}

/**
 * 修改用户密码信息接口 (POST)
 * @param {object} data - Request payload (Structure based on documentation).
 * --- Data Properties ---
 * @property {string} username - 用户名 (Required).
 * @property {string} oldPassword - 旧密码 (Required).
 * @property {string} newPassword - 新密码 (Required).
 * @returns {Promise<any>} A promise resolving with the API response.
 */
export function postModifyUserPassword(data) {
  return request({
    url: '/api/user/modifyUserPassword',
    method: 'post',
    data: data
  })
}

/**
 * 用户登录接口 (GET)
 * @param {object} [query] - Optional query parameters.
 * --- Query Properties ---
 * @property {string} username - 用户名 (Required).
 * @property {string} password - 密码 (Required).
 * @returns {Promise<object>} A promise resolving with the API response.
 * --- Response Properties (resolved object) ---
 * @property {string} token - 后续所有请求带上token.
 */
export function getLogin(query) {
  return request({
    url: '/api/user/login',
    method: 'get',
    params: query
  })
}

/**
 * 用户登录接口 (POST)
 * @param {object} data - Request payload (Structure based on documentation).
 * --- Data Properties ---
 * @property {string} username - 用户名 (Required).
 * @property {string} password - 密码 (Required).
 * @returns {Promise<object>} A promise resolving with the API response.
 * --- Response Properties (resolved object) ---
 * @property {string} token - 后续所有请求带上token.
 */
export function postLogin(data) {
  return request({
    url: '/api/user/login',
    method: 'post',
    data: data
  })
}

/**
 * 用户注销登录接口 (GET)
 * @param {object} [query] - Optional query parameters.
 * --- Query Properties ---
 * @property {string} username - 用户名 (Required).
 * @property {string} token - 登录令牌 (Required).
 * @returns {Promise<any>} A promise resolving with the API response.
 */
export function getLogout(query) {
  return request({
    url: '/api/user/logout',
    method: 'get',
    params: query
  })
}

/**
 * 用户注销登录接口 (POST)
 * @param {object} data - Request payload (Structure based on documentation).
 * --- Data Properties ---
 * @property {string} username - 用户名 (Required).
 * @property {string} token - 登录令牌 (Required).
 * @returns {Promise<any>} A promise resolving with the API response.
 */
export function postLogout(data) {
  return request({
    url: '/api/user/logout',
    method: 'post',
    data: data
  })
}
